<style lang="scss" scoped>
    .mshop-infinite-scroll {
        height: 100%;
    }
</style>

<template>
    <div class="mshop-infinite-scroll">
        <slot></slot>
    </div>
</template>

<script>
    import infiniteScrollFactory from 'lib/infinite-scroll'

    export default {
        props: {
            action: Function,
        },
        data () { return {scroll: false} },
        ready () {
            this.scroll = new infiniteScrollFactory(this.$el);
            this.scroll.on(this.action);
        }
    }
</script>
